﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bussiness;
using Model.Entities;

namespace WebApp
{
    public partial class GetProduct : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void BtnOK_Click(object sender, EventArgs e)
        {
            Products p = new Products()
            {
                CreateTime = DateTime.Now,
                Name = this.txtProductName.Value.Trim(),
                Price = decimal.Parse(this.txtPrice.Value.Trim())
            };
            ProductOperation.Instance.InsertProduct(p);
        }
    }
}